import threading
import time

class MyThread(threading.Thread):

    def __init__(self,action):
        threading.Thread.__init__(self)
        self.action = action


    def run(self):
        print("我想要{},时间是{}".format(self.action, time.ctime()))
        time.sleep(3)


if __name__ == "__main__":
    t1 = MyThread("看电影")
    t2 = MyThread("听音乐")
    t1.start()
    t2.start()